[Instances] List eligible upgrade sizes for a compute instance
curl --request GET \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"vcpu": 2147483647,
"ram_mb": 2147483647,
"bandwidth_mbps": 2147483647,
"available_volumes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"disk_gb": 2147483647,
"is_default": true,
"is_active": true
}
],
"pricing_options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": "<string>",
"discount_percent": "<string>",
"is_default": true,
"is_active": true
}
],
"available_addons": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addon": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"name_fr": "<string>",
"description": "<string>",
"description_fr": "<string>",
"is_active": true
},
"pricing_options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": "<string>",
"is_active": true
}
],
"is_included": true,
"is_default": true,
"is_active": true
}
],
"created": "2023-11-07T05:31:56Z",
"modified": "2023-11-07T05:31:56Z",
"is_active": true,
"description": "<string>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Compute
[Instances] List eligible upgrade sizes for a compute instance
Retrieve the list of instance sizes the current instance is eligible to upgrade to, based on the configured upgrade paths in the billing system. Returns an empty list when the current size is not mapped to a billing product.
GET
/
v1
/
organizations
/
{organization_id}
/
projects
/
{project_id}
/
compute
/
instances
/
{id}
/
eligible-sizes
[Instances] List eligible upgrade sizes for a compute instance
curl --request GET \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/eligible-sizes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"vcpu": 2147483647,
"ram_mb": 2147483647,
"bandwidth_mbps": 2147483647,
"available_volumes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"disk_gb": 2147483647,
"is_default": true,
"is_active": true
}
],
"pricing_options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": "<string>",
"discount_percent": "<string>",
"is_default": true,
"is_active": true
}
],
"available_addons": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addon": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"name_fr": "<string>",
"description": "<string>",
"description_fr": "<string>",
"is_active": true
},
"pricing_options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": "<string>",
"is_active": true
}
],
"is_included": true,
"is_default": true,
"is_active": true
}
],
"created": "2023-11-07T05:31:56Z",
"modified": "2023-11-07T05:31:56Z",
"is_active": true,
"description": "<string>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Authorizations
Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).
Path Parameters
A UUID string identifying this Instance.
Unique identifier of the organization that owns the resource.
Unique identifier of the project containing the resource.
⌘I

